import VueRouter from 'vue-router';

// 首页
import index from '../../components/index.vue'
import home from '../../components/indexs/home.vue'
import mall from '../../components/indexs/mall.vue'
import live from '../../components/indexs/live.vue'
import mine from '../../components/indexs/mine.vue'

import type from '../../components/common/type.vue'
import search from '../../components/common/search.vue'
import server from '../../components/common/server.vue'

import QQLogin from '../../components/mine/QQlogin.vue'
import passFreeLogin from '../../components/mine/passFreeLogin.vue'

import detail from '../../components/detail/detail.vue'
import newCount from '../../components/detail/newCount.vue'

import shopDetail from '../../components/detail/shopDetail.vue'

// import car from '../../components/detail/car.vue'
import car1 from '../../components/detail/car1.vue'
export default new VueRouter({
    routes: [
        {
            path: '/home',
            component: index,
            children: [
                {
                    path: '/home',
                    component:home
                },
                {
                    path: '/mall',
                    component: mall
                },
                {
                    path: '/live',
                    component:live
                },
                {
                    path: '/mine',
                    component: mine
                },
            ]
        },
        {
            path: '/type',
            component:type
        },
        {
            path: '/search',
            component:search
        },
        {
            path: '/server',
            component:server
        },
        {
            path: '/QQLogin',
            component: QQLogin
        },
        {
            path: '/passFreeLogin',
            component: passFreeLogin
        },
        {
            path: '/detail/:id/:title',
            component: detail,
        },
        {
            path: '/newCount',
            component: newCount,
        },
        {
            path: '/shopDetail/:title',
            component: shopDetail
        },
        // {
        //     path: '/car',
        //     component:car
        // },
        {
            path: '/car1',
            component: car1
        },
        {
            path: '/*',
            redirect: '/home'
        },
    ]
})